package cn.tedu.hotel.serve.pojo.dto;

import lombok.Data;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Pattern;
import java.io.Serializable;

@Data
public class UserRegisterDTO implements Serializable {
    private String username;
    private String nickname;

    @NotNull
    @NotEmpty
    @Pattern(regexp = "(?!^(\\d+|[a-zA-Z]+|[~!@#$%^&*()_.]+)$)^[\\w~!@#$%^&*()_.]{8,16}$",message = "密码格式不正确")
    private String password;

    @NotNull
    @NotEmpty
    @Pattern(regexp ="^1[3-9]\\d{9}$",message = "手机号码格式不正确")
    private String phone;
}
